<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>java基础：正则表达式 | haijd</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  <meta name="keywords" content="Java基础" />
  
  
  
  
  <meta name="description" content="Java基础：正则表达式">
<meta name="keywords" content="Java基础">
<meta property="og:type" content="article">
<meta property="og:title" content="Java基础：正则表达式">
<meta property="og:url" content="http://www.hais2.com/2017/05/22/Java基础：正则表达式/index.html">
<meta property="og:site_name" content="haijd">
<meta property="og:description" content="Java基础：正则表达式">
<meta property="og:locale" content="default">
<meta property="og:image" content="http://ww1.sinaimg.cn/large/c55a7aeely1fmdrn8b8i8j20go0dejrs.jpg">
<meta property="og:updated_time" content="2017-12-13T12:25:59.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Java基础：正则表达式">
<meta name="twitter:description" content="Java基础：正则表达式">
<meta name="twitter:image" content="http://ww1.sinaimg.cn/large/c55a7aeely1fmdrn8b8i8j20go0dejrs.jpg">
  
    <link rel="alternate" href="/atom.xml" title="haijd" type="application/atom+xml">
  
  <link rel="icon" href="/css/images/favicon.ico">
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Montserrat:700" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic" rel="stylesheet" type="text/css">
  <link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
  <style type="text/css">
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/9749f0/00000000000000000001008f/27/l?subset_id=2&fvd=n5) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/90cf9f/000000000000000000010091/27/l?subset_id=2&fvd=n7) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/8a5494/000000000000000000013365/27/l?subset_id=2&fvd=n4) format("woff2");font-weight:lighter;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/d337d8/000000000000000000010095/27/l?subset_id=2&fvd=i4) format("woff2");font-weight:400;font-style:italic;}</style>
    
  <link rel="stylesheet" id="athemes-headings-fonts-css" href="//fonts.googleapis.com/css?family=Yanone+Kaffeesatz%3A200%2C300%2C400%2C700&amp;ver=4.6.1" type="text/css" media="all">
  <link rel="stylesheet" href="/css/style.css">

  <script src="/js/jquery-3.1.1.min.js"></script>

  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="/css/bootstrap.css" >
  <link rel="stylesheet" href="/css/hiero.css" >
  <link rel="stylesheet" href="/css/glyphs.css" >
  
    <link rel="stylesheet" href="/css/vdonate.css" >
  

</head>

<script>
var themeMenus = {};

  themeMenus["/"] = "Home"; 

  themeMenus["/archives"] = "Archives"; 

  themeMenus["/categories"] = "Categories"; 

  themeMenus["/tags"] = "Tags"; 

  themeMenus["/about"] = "About"; 

</script>


  <body data-spy="scroll" data-target="#toc" data-offset="50">


  <header id="allheader" class="site-header" role="banner">
  <div class="clearfix container">
      <div class="site-branding">

          <h1 class="site-title">
            
              <a href="/" title="haijd" rel="home"> haijd </a>
            
          </h1>

          
            <div class="site-description">Stay Hungry,Stay Foolish</div>
          
            
          <nav id="main-navigation" class="main-navigation" role="navigation">
            <a class="nav-open">Menu</a>
            <a class="nav-close">Close</a>
            <div class="clearfix sf-menu">

              <ul id="main-nav" class="nmenu sf-js-enabled">
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/">Home</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/archives">Archives</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/categories">Categories</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/tags">Tags</a> </li>
                    
                      <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-1663"> <a class="" href="/about">About</a> </li>
                    
              </ul>
            </div>
          </nav>


      </div>
  </div>
</header>




  <div id="container">
    <div id="wrap">
            
      <div id="content" class="outer">
        
          <section id="main" style="float:none;"><article id="post-Java基础：正则表达式" style="width: 66%; float:left;" class="article article-type-post" itemscope itemprop="blogPost" >
  <div id="articleInner" class="clearfix post-1016 post type-post status-publish format-standard has-post-thumbnail hentry category-template-2 category-uncategorized tag-codex tag-edge-case tag-featured-image tag-image tag-template">
    
<div class="article-gallery">
  <div class="article-gallery-photos">
    
      <a class="article-gallery-img fancybox" href="http://ww1.sinaimg.cn/large/c55a7aeely1fmdrn8b8i8j20go0dejrs.jpg" rel="gallery_cjie4naj6005j3swa5z01tbnd">
        <img src="http://ww1.sinaimg.cn/large/c55a7aeely1fmdrn8b8i8j20go0dejrs.jpg" itemprop="image">
      </a>
    
  </div>
</div>

    
      <header class="article-header">
        
  
    <h1 class="thumb" class="article-title" itemprop="name">
      Java基础：正则表达式
    </h1>
  

      </header>
    
    <div class="article-meta">
      
	Posted on <a href="/2017/05/22/Java基础：正则表达式/" class="article-date">
	  <time datetime="2017-05-22T12:10:45.000Z" itemprop="datePublished">May 22, 2017</time>
	</a>

      
	<span id="busuanzi_container_page_pv">
	  本文总阅读量<span id="busuanzi_value_page_pv"></span>次
	</span>

    </div>
    <div class="article-entry" itemprop="articleBody">
      
        <!-- TOC -->
<ul>
<li><a href="#正则表达式的概念和作用">正则表达式的概念和作用</a></li>
<li><a href="#正则表达式语法规则">正则表达式语法规则</a></li>
<li><a href="#正则表达式相关的string类方法">正则表达式相关的String类方法</a></li>
<li><a href="#匹配示例">匹配示例</a></li>
<li><a href="#切割示例">切割示例</a></li>
<li><a href="#替换示例">替换示例</a></li>
</ul>
<!-- /TOC -->
<h3 id="正则表达式的概念和作用"><a href="#正则表达式的概念和作用" class="headerlink" title="正则表达式的概念和作用"></a>正则表达式的概念和作用</h3><ul>
<li>正则表达式的概述<ul>
<li>正则表达式也是一个字符串，用来定义匹配规则，在Pattern类中有简单的规则定义。可以结合字符串类的方法使用。</li>
<li>正则表达式是具有特殊含义的字符串。</li>
</ul>
</li>
<li>正则表达式的作用<ul>
<li>比如注册账户,需要输入用户名和密码,一般会对其限制长度,这个限制长度的事情就是正则表达式做的<a id="more"></a>        
<h3 id="正则表达式语法规则"><a href="#正则表达式语法规则" class="headerlink" title="正则表达式语法规则"></a>正则表达式语法规则</h3></li>
</ul>
</li>
<li>正则表达式语法规则<ul>
<li>字符<ul>
<li><code>x</code>  代表的是字符x</li>
<li><code>\\</code> 代表的是反斜线字符’\’</li>
<li><code>\t</code> 代表的是制表符</li>
<li><code>\n</code> 代表的是换行符</li>
<li><code>\r</code> 代表的是回车符</li>
</ul>
</li>
<li>字符类<ul>
<li><code>[abc]</code>    a、b 或 c（简单类）</li>
<li><code>[^abc]</code>   任何字符，除了 a、b 或 c（否定）</li>
<li><code>[a-zA-Z]</code> a到 z 或 A到 Z，两头的字母包括在内（范围） </li>
<li><code>[0-9]</code>    0到9的字符都包括</li>
<li><code>[a-zA-Z_0-9]</code> 代表的字母或者数字或者下划线</li>
</ul>
</li>
<li>预定义字符类<ul>
<li><code>.</code> 任何字符。</li>
<li><code>\d</code> 数字：[0-9]</li>
<li><code>\w</code> 单词字符：[a-zA-Z_0-9]如”com.itheima.tests”/finish</li>
</ul>
</li>
<li>边界匹配器<ul>
<li><code>^</code>  代表的是行的开头</li>
<li><code>$</code>  代表的是行的结尾</li>
<li><code>\b</code> 代表的是单词边界</li>
</ul>
</li>
<li>数量词<ul>
<li><code>X?</code>     X，一次或一次也没有</li>
<li><code>X*</code>     X，零次或多次</li>
<li><code>X+</code>     X，一次或多次</li>
<li><code>X{n}</code>   X，恰好 n 次 </li>
<li><code>X{n,}</code>  X，至少 n 次 </li>
<li><code>X{n,m}</code> X，至少 n 次，但是不超过 m 次</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="正则表达式相关的String类方法"><a href="#正则表达式相关的String类方法" class="headerlink" title="正则表达式相关的String类方法"></a>正则表达式相关的String类方法</h3><ul>
<li>正则表达式练习和相关的String类方法<ul>
<li><code>boolean matches(String 正则的规则)</code><ul>
<li><code>&quot;abc&quot;.matches(&quot;[a]&quot;)</code> </li>
<li>匹配成功返回true</li>
</ul>
</li>
<li><code>String[] split(String 正则的规则)</code><ul>
<li><code>&quot;abc&quot;.split(&quot;a&quot;)</code> </li>
<li>使用规则将字符串进行切割</li>
</ul>
</li>
<li><code>String replaceAll( String 正则规则,String 字符串)</code><ul>
<li><code>&quot;abc0123&quot;.repalceAll(&quot;[\\d]&quot;,&quot;#&quot;)</code>    </li>
<li>按照正则的规则,替换字符串</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="匹配示例"><a href="#匹配示例" class="headerlink" title="匹配示例"></a>匹配示例</h3><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment">*  检查手机号码是否合法</span></span><br><span class="line"><span class="comment">*  1开头 第二位可以是34578 位数固定11位</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">checkPhone</span><span class="params">()</span></span>&#123;</span><br><span class="line">	String telNumber = <span class="string">"158123456789"</span>;</span><br><span class="line">	<span class="comment">//String类的方法matches</span></span><br><span class="line">	<span class="keyword">boolean</span> b = telNumber.matches(<span class="string">"1[34857][\\d]&#123;9&#125;"</span>);</span><br><span class="line">	System.out.println(b);   <span class="comment">//输出：true</span></span><br><span class="line">&#125;</span><br><span class="line">				</span><br><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment">*  检查QQ号码是否合法</span></span><br><span class="line"><span class="comment">*  0不能开头,全数字, 位数5,10位</span></span><br><span class="line"><span class="comment">*  123456 </span></span><br><span class="line"><span class="comment">*  \\d  \\D匹配不是数字</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">checkQQ</span><span class="params">()</span></span>&#123;</span><br><span class="line">	String QQ = <span class="string">"123456"</span>;</span><br><span class="line">	<span class="comment">//检查QQ号码和规则是否匹配,String类的方法matches</span></span><br><span class="line">	<span class="keyword">boolean</span> b = QQ.matches(<span class="string">"[1-9][\\d]&#123;4,9&#125;"</span>);</span><br><span class="line">	System.out.println(b); <span class="comment">//输出：true</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="切割示例"><a href="#切割示例" class="headerlink" title="切割示例"></a>切割示例</h3><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment">* String类方法split对字符串进行切割</span></span><br><span class="line"><span class="comment">* www.baidu.com 按照 . 切割字符串</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">splitExample</span><span class="params">()</span></span>&#123;</span><br><span class="line">	String ip = <span class="string">"www.baidu.com"</span>;</span><br><span class="line">	String[] strArr = ip.split(<span class="string">"\\."</span>);</span><br><span class="line">	<span class="keyword">for</span>(<span class="keyword">int</span> i = <span class="number">0</span> ; i &lt; strArr.length ; i++)&#123;</span><br><span class="line">		System.out.println(strArr[i]);   <span class="comment">//分别输出：www  baidu  com</span></span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment">* String类方法split对字符串进行切割</span></span><br><span class="line"><span class="comment">* 按照空格切割字符串</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">splitExample</span><span class="params">()</span></span>&#123;</span><br><span class="line">	String str = <span class="string">"h ai j     d"</span>;</span><br><span class="line">	String[] strArr = str.split(<span class="string">" +"</span>);</span><br><span class="line">	<span class="keyword">for</span>(<span class="keyword">int</span> i = <span class="number">0</span> ; i &lt; strArr.length ; i++)&#123;</span><br><span class="line">		System.out.println(strArr[i]);  <span class="comment">//分别输出：h  ai  j  d</span></span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment">*  String类方法split对字符串进行切割</span></span><br><span class="line"><span class="comment">*  按照-对字符串进行切割</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">splitExample</span><span class="params">()</span></span>&#123;</span><br><span class="line">    String str = <span class="string">"hai-j-d"</span>;</span><br><span class="line">	<span class="comment">//按照-对字符串进行切割,String类方法split</span></span><br><span class="line">	String[] strArr = str.split(<span class="string">"-"</span>);</span><br><span class="line">	<span class="keyword">for</span>(<span class="keyword">int</span> i = <span class="number">0</span> ; i &lt; strArr.length ; i++)&#123;</span><br><span class="line">		System.out.println(strArr[i]);  <span class="comment">//分别输出：hai j d</span></span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="替换示例"><a href="#替换示例" class="headerlink" title="替换示例"></a>替换示例</h3><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">/*</span></span><br><span class="line"><span class="comment">* 将字符串中出现的所有数字替换掉</span></span><br><span class="line"><span class="comment">* String类方法replaceAll(正则规则,替换的内容)</span></span><br><span class="line"><span class="comment">*/</span></span><br><span class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">replaceExample</span><span class="params">()</span></span>&#123;</span><br><span class="line">	String str = <span class="string">"hai123"</span>;</span><br><span class="line">	str = str.replaceAll(<span class="string">"[\\d]+"</span>, <span class="string">"jd"</span>);</span><br><span class="line">	System.out.println(str);  <span class="comment">//输出haijd</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
      
    </div>
    <footer class="entry-meta entry-footer">
      
	<span class="ico-folder"></span>
    <a class="article-category-link" href="/categories/Java/">Java</a>

      
  <span class="ico-tags"></span>
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Java基础/">Java基础</a></li></ul>

      
        <div id="donation_div"></div>

<script src="/js/vdonate.js"></script>
<script>
var a = new Donate({
  title: '如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作!', // 可选参数，打赏标题
  btnText: 'Donate', // 可选参数，打赏按钮文字
  el: document.getElementById('donation_div'),
  wechatImage: '/css/images/wechatPay.png',
  alipayImage: '/css/images/alipay.jpg'
});
</script>
      

      
        
	<section id="comments" class="comment">
	  <div id="disqus_thread">
	  <noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
	  </div>
	</section>

	<script type="text/javascript">
	var disqus_shortname = 'haijdblog';
	(function(){
	  var dsq = document.createElement('script');
	  dsq.type = 'text/javascript';
	  dsq.async = true;
	  dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
	  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	}());
	(function(){
	  var dsq = document.createElement('script');
	  dsq.type = 'text/javascript';
	  dsq.async = true;
	  dsq.src = '//' + disqus_shortname + '.disqus.com/count.js';
	  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
	}());
	</script>


      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2017/05/25/Java基础：Data-Calendar/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          Java基础：Data&amp;Calendar
        
      </div>
    </a>
  
  
    <a href="/2017/05/21/Java基础：String类/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">Java基础：String类</div>
    </a>
  
</nav>

  
</article>

<!-- Table of Contents -->

  <aside id="sidebar">
    <div id="toc" class="toc-article">
    <strong class="toc-title">Contents</strong>
    
      <ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#正则表达式的概念和作用"><span class="nav-number">1.</span> <span class="nav-text">正则表达式的概念和作用</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#正则表达式语法规则"><span class="nav-number">2.</span> <span class="nav-text">正则表达式语法规则</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#正则表达式相关的String类方法"><span class="nav-number">3.</span> <span class="nav-text">正则表达式相关的String类方法</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#匹配示例"><span class="nav-number">4.</span> <span class="nav-text">匹配示例</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#切割示例"><span class="nav-number">5.</span> <span class="nav-text">切割示例</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#替换示例"><span class="nav-number">6.</span> <span class="nav-text">替换示例</span></a></li></ol>
    
    </div>
  </aside>
</section>
        
      </div>
      <footer id="footer" class="site-footer">
  

  <div class="clearfix container">
      <div class="site-info">
	      &copy; 2018 haijd All Rights Reserved.
          
            <span id="busuanzi_container_site_uv">
              本站访客数<span id="busuanzi_value_site_uv"></span>人次  
              本站总访问量<span id="busuanzi_value_site_pv"></span>次
            </span>
          
      </div>
      <div class="site-credit">
        Theme by <a href="https://github.com/iTimeTraveler/hexo-theme-hiero" target="_blank">hiero</a>
      </div>
  </div>
</footer>


<!-- min height -->

<script>
    var contentdiv = document.getElementById("content");

    contentdiv.style.minHeight = document.body.offsetHeight - document.getElementById("allheader").offsetHeight - document.getElementById("footer").offsetHeight + "px";
</script>
    </div>
    <!-- <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/categories" class="mobile-nav-link">Categories</a>
  
    <a href="/tags" class="mobile-nav-link">Tags</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
</nav> -->
    

<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/scripts.js"></script>
<script src="/js/bootstrap.js"></script>
<script src="/js/main.js"></script>








	<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
	</script>






  </div>

  <a id="rocket" href="#top" class=""></a>
  <script type="text/javascript" src="/js/totop.js" async=""></script>
</body>
</html>
